package groovy映射

class 映射个别方法举例 {

    static void main(String[] args) {
        def map=["key1":"value1","key2":"value2"];
        println map.get("key1");
        println map.containsKey("key1");
        /*得到所有的键值*/
        println map.keySet();
        /*向映射里面插入值*/
        map.put("key3","value3");
        println map;
    }

}
